UniqueID
UniqueID Get unique resource ID (before adding a resource) ResType rType ; 4-byte resource type; e.g., 'MENU' returns a unique, unused resource ID
UniqueID returns a unique, unused resource ID that will not collide with any resource of the specified type in any open resource file.
rType is a 4-byte ResType value. It identifies the resource type for which you wish a unique resource ID (e.g., 'FONT', 'WIND', etc.)
Returns: an integer; a resource ID number that is unique with respect to all resources of type rType in all currently-open resource files.
especially temporary resources that are removed when the program
terminates. After making this call, you can safely add to the resource list,
e.g.,:
To avoid colliding with IDs of ROM-based resources (i.e., get a truly
unique ID), set the RomMapInsert flag directly before calling:
This call may return IDs less than 128 which, by convention, are reserved
for system resources. Just call it again until you get an ID greater than
127.